profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/mgsloan/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

haskell/haskell-ide-engine 2435

The engine for haskell ide-integration. Not an IDE

ekmett/lens 1793

Lenses, Folds, and Traversals - Join us on freenode #haskell-lens

haskell/cabal 1290

Official upstream development repository for Cabal and cabal-install

ekmett/tables 78

Deprecated because of

divipp/lgtk 15

Lens-based Gtk interface

mgsloan/crdt 13

Implementation of Haskell CRDTs (Commutative Replicated Data Types)

fpco/th-utilities 9

Collection of useful functions for use with Template Haskell

issue commentmgsloan/th-reify-many

Bugfix in `th-expand-syns-0.4.9.0` breaks `th-reify-many`

Also, I've added you as a collaborator on github and maintainer on hackage, which will expedite such fixes if they occur again in the future :)

RyanGlScott

comment created time in 20 days

MemberEvent

create barnchmgsloan/stackage

branch : remove-upper-bound-on-th-expand-syns-6187

created branch time in 20 days

issue commentmgsloan/th-reify-many

Bugfix in `th-expand-syns-0.4.9.0` breaks `th-reify-many`

Fix released in 0.1.10. Thanks a bunch for noticing and fixing this @RyanGlScott !

RyanGlScott

comment created time in 20 days

created tagmgsloan/th-reify-many

tagv0.1.10

Recurseively reify template haskell datatype info

created time in 20 days

push eventmgsloan/th-reify-many

Michael Sloan

commit sha d81ee6b6862e2ca7daa8ba1ed7b60d9cb3bf20b0

Add some stack files to .gitignore

view details

Michael Sloan

commit sha 850ac215de461fad3dd24dd6b2048a3aa2177d04

Version 0.1.10

view details

push time in 20 days

push eventmgsloan/th-reify-many

Ryan Scott

commit sha 20c6e3d574b5f3c3ad5eb2f6dffcc5a9492fe1a8

Call unSigT on outermost applications in instanceMatches Fixes #9.

view details

push time in 20 days

issue closedmgsloan/th-reify-many

Bugfix in `th-expand-syns-0.4.9.0` breaks `th-reify-many`

After uploading th-expand-syns-0.4.9.0, I noticed that th-orphans-0.13.11 now fails to compile:

[2 of 2] Compiling Language.Haskell.TH.Instances ( src/Language/Haskell/TH/Instances.hs, dist/build/Language/Haskell/TH/Instances.o, dist/build/Language/Haskell/TH/Instances.dyn_o )

src/Language/Haskell/TH/Instances.hs:478:2: error:
    Duplicate instance declarations:
      instance Lift a => Lift (Maybe a)
        -- Defined at src/Language/Haskell/TH/Instances.hs:478:2
      instance Lift a => Lift (Maybe a)
        -- Defined in ‘Language.Haskell.TH.Syntax’
    |
478 | $(reifyManyWithoutInstances ''Lift [''Info, ''Loc] (const True) >>=
    |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

src/Language/Haskell/TH/Instances.hs:478:2: error:
    Duplicate instance declarations:
      instance Lift a => Lift (GHC.Real.Ratio a)
        -- Defined at src/Language/Haskell/TH/Instances.hs:478:2
      instance Integral a => Lift (GHC.Real.Ratio a)
        -- Defined in ‘Language.Haskell.TH.Syntax’
    |
478 | $(reifyManyWithoutInstances ''Lift [''Info, ''Loc] (const True) >>=
    |  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...

Some investigation reveals that a minor bugfix in th-expand-syns-0.4.9.0 is affecting the behavior of th-reify-many, which has adverse consequences for libraries that depend on it (e.g., th-orphans). Here is a test program which illustrates the difference between th-expand-syns-0.4.8.0 and 0.4.9.0:

{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TemplateHaskell #-}
module Main (main) where

import Language.Haskell.TH (pprint, stringE)
import Language.Haskell.TH.ExpandSyns (expandSyns)

main :: IO ()
main = putStrLn
  $(do ty  <- [t| Maybe Int :: * |]
       ty' <- expandSyns ty
       stringE (pprint ty'))

With th-expand-syns-0.4.9.0, this will print out the following output, as expected:

(GHC.Maybe.Maybe GHC.Types.Int :: *)

But on th-expand-syns-0.4.8.0, this will instead print out the following output:

(GHC.Maybe.Maybe :: *) GHC.Types.Int

Notice that the kind signature has been pushed inwards.


What does any of this have to do with th-reify-many? It turns out that th-reify-many was silently relying on the buggy behavior of th-expand-syns-0.4.8.0 in order to work correctly in some cases. When you call reify on a class name (as th-expand-syns does here), it will reify some instance arguments with an outermost kind signature. For example, if we use the Lift example from earlier, we get:

λ> putStrLn $(reify ''Lift >>= stringE . pprint)
class Language.Haskell.TH.Syntax.Lift (t_0 :: GHC.Prim.TYPE r_1)
    where ...
...
instance GHC.Real.Integral a_61 => Language.Haskell.TH.Syntax.Lift (GHC.Real.Ratio a_61 :: *)
instance Language.Haskell.TH.Syntax.Lift a_63 => Language.Haskell.TH.Syntax.Lift (GHC.Maybe.Maybe a_63 :: *)
...

When checking if an instance has already been defined, th-reify-many will attempt to strip off these kind signatures (using the unSigT function) so as not to affect the results of (==). This happens in this line:

https://github.com/mgsloan/th-reify-many/blob/a9921060f7e8859f9867b4259c321e887c2e9084/src/Language/Haskell/TH/ReifyMany/Internal.hs#L103

However, note that unSigT is called on the head of the application (i.e., the result of headMay), not on the overall application itself. In other words, this will remove the kind signature in (Maybe :: *) a, but it will not remove the kind signature in (Maybe a) :: *. Because of this, the call to unAppsT will not decompose the (Maybe a) :: * application, which causes th-reify-many to incorrectly believe that a Lift instance does not exist for Maybe.

One possible fix is to just call unSigT an additional time:

diff --git a/src/Language/Haskell/TH/ReifyMany/Internal.hs b/src/Language/Haskell/TH/ReifyMany/Internal.hs
index ae7b373..11ba090 100644
--- a/src/Language/Haskell/TH/ReifyMany/Internal.hs
+++ b/src/Language/Haskell/TH/ReifyMany/Internal.hs
@@ -100,7 +100,7 @@ lookupInstance xs n = headMay $ filter (`instanceMatches` n) xs
 -- the given 'TypeclassInstance'.
 instanceMatches :: TypeclassInstance -> Name -> Bool
 instanceMatches (TypeclassInstance _ typ _) n' =
-    case tailMay $ map (fmap unSigT . headMay . unAppsT) $ unAppsT typ of
+    case tailMay $ map (fmap unSigT . headMay . unAppsT . unSigT) $ unAppsT typ of
         Nothing -> False
         Just xs -> not $ null [() | Just (ConT n) <- xs, n == n']

This is sufficient to make th-orphans-0.13.11 compile again.

closed time in 20 days

RyanGlScott

pull request commentmgsloan/th-reify-many

Call unSigT on outermost applications in instanceMatches

Thanks for the fix!! Sorry about the delay in merging + releasing

RyanGlScott

comment created time in 20 days

issue commentmgsloan/store

Support for GHC 9?

Glad it's finding use in Liquid Haskell! Such a cool project!

https://github.com/mgsloan/store/blob/master/src/System/IO/ByteBuffer.hs uses Liquid Haskell to verify some memory safety constraints :)

On Mon, Aug 16, 2021, 17:25 Ranjit Jhala ***@***.***> wrote:

wow, thank you so much @facundominguez https://github.com/facundominguez and @mgsloan https://github.com/mgsloan !!!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mgsloan/store/issues/160#issuecomment-899882189, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAFQKVHZBBXUBLJA3PBUKDT5GM7NANCNFSM5B23KRMQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

ranjitjhala

comment created time in a month

issue commentmgsloan/store

Support for GHC 9?

Thanks @facundominguez - this is now released on hackage as version 0.7.12 :)

ranjitjhala

comment created time in a month

created tagmgsloan/store

tagstore-0.7.12

Fast binary serialization in Haskell

created time in a month

push eventmgsloan/store

Michael Sloan

commit sha d443199129e3ad2b8bedb565cd6cbbce9dee0c73

Version 0.7.12

view details

push time in a month

pull request commentmgsloan/store

Build with ghc-9.0.1

Awesome, thank you!!

facundominguez

comment created time in a month

push eventmgsloan/store

Facundo Domínguez

commit sha c8253130053c5f657195c312863d39da18c4ed3c

Derive some instances earlier

view details

Facundo Domínguez

commit sha 1f1b4767b173951e0e98fb5fc4d97d8f66812391

Generalize the type of staticByteStringExp

view details

Facundo Domínguez

commit sha 64c55913f95f796c421fa77f2457e67e9dec7d63

Build context for Store instances on type constructors with higher kinds

view details

Facundo Domínguez

commit sha d69b0562b88f085a212374f11198903ade477cd0

Add missing instance for Serial m IoSubSystem

view details

Facundo Domínguez

commit sha 24e8d839fc002dfcc92922e61a2614175f743d96

Build with ghc-9.0.1 in CI

view details

Facundo Domínguez

commit sha 0d4156ef5736ef32085b3d90fb7cd151f0520d54

Update changelog

view details

push time in a month

PR merged mgsloan/store

Build with ghc-9.0.1

Closes #160

+49 -11

1 comment

7 changed files

facundominguez

pr closed time in a month

issue closedmgsloan/store

Support for GHC 9?

Hi @mgsloan,

Can you give me a sense of any plans to update store to work with ghc 9?

I recently switched liquidhaskell from binary to store -- and it was awesome -- in the blink of an eye, store was deserializing files that took binary literally hours (!)

Unfortunately, it turns out that it breaks our ghc9 build. So am wondering what your plans are, e.g. whether its doubtful in the short term, or if I should try to send a patch or, if its already in the works?

Thanks so much!

  • Ranjit.

closed time in a month

ranjitjhala

issue commentmgsloan/store

Support for GHC 9?

Awesome, I'm glad you've found store to be helpful for liquidhaskell! I have not not started work on a patch, but I can try to write one soonish. I will comment here if I start working on it. In the meantime, I'd gladly merge a PR adding support for ghc 9

On Mon, Aug 9, 2021 at 3:34 PM Ranjit Jhala ***@***.***> wrote:

Hi @mgsloan https://github.com/mgsloan,

Can you give me a sense of any plans to update store to work with ghc 9?

I recently switched liquidhaskell from binary to store -- and it was awesome -- in the blink of an eye, store was deserializing files that took binary literally hours (!)

Unfortunately, it turns out that it breaks our ghc9 build. So am wondering what your plans are, e.g. whether its doubtful in the short term, or if I should try to send a patch or, if its already in the works?

Thanks so much!

  • Ranjit.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mgsloan/store/issues/160, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAFQKWDAI5MU6H46KFFQWTT4BCVVANCNFSM5B23KRMQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

ranjitjhala

comment created time in 2 months

push eventmgsloan/mgsloan-dotfiles

Michael Sloan

commit sha 1850bde6492522245fb7ed0613b1da60f8004df8

Updates to setup log

view details

Michael Sloan

commit sha 50d118da929b246d1d97fb863a6d5d105684a1e5

Change slock autostart to not engage on f110

view details

push time in 2 months

push eventmgsloan/mgsloan-dotfiles

Michael Sloan

commit sha 09aba708751cc2ca9a741f6824da6be3466e76b7

Update stack.yaml.lock

view details

Michael Sloan

commit sha da53d7c2e3704bf0ec0952f7faf5075e7c2f4a9e

Add f110-setup-log.md

view details

push time in 2 months

issue commentmgsloan/todoist-shortcuts

Safari extension

That's awesome that the fix worked! The "Failed to figure out background color" errors are benign. The most recent code changes them to warnings instead.

On Sun, Jul 25, 2021 at 7:58 AM f4jNZgfgG9oDqmvcNvUF < ***@***.***> wrote:

@mgsloan https://github.com/mgsloan That actually seems to work very well. I see some console errors like "Failed to figure out background color" and "Couldn't find ID – page_background" but those don't seem to affect functionality as far as I can tell. I thought I saw a reference error, but cannot duplicate it. Then again, whenever I open the javascript console on any given page I can often see an error :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mgsloan/todoist-shortcuts/issues/161#issuecomment-886206251, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAFQKWBDKNQQWU6TXAZPNLTZQKBXANCNFSM4UHWGKXQ .

rakleed

comment created time in 2 months

issue closedmgsloan/todoist-shortcuts

Shortcuts for subtask manipulation in task view

I have a change adding a fair bit of shortcuts for the new task view, but haven't yet added stuff for manipulating the subtasks. This issue tracks doing that.

closed time in 2 months

mgsloan

issue commentmgsloan/todoist-shortcuts

Shortcuts for subtask manipulation in task view

Closing as wontfix, I personally don't use the task view.

mgsloan

comment created time in 2 months

issue closedmgsloan/todoist-shortcuts

Feature request: on/off button

I notice select and drag no longer works with this extension is on. Would just be great to be able to easily turn extension on and off when I need dragging at times. (I'm assuming it's impossible or really challenging to allow for dragging and extensions, so clicking the extension in the Chrome toolbar to toggle on and off would be great). Right now I have to open the extensions panel and turn it off which is a pain.

closed time in 2 months

kellyarwine

issue commentmgsloan/todoist-shortcuts

Feature request: on/off button

Closing as wontfix. Thanks for the suggestion!

kellyarwine

comment created time in 2 months

issue commentmgsloan/todoist-shortcuts

Shortcut for toggling between task completable and incompletable

Closing as wontfix, too tricky of a UI interaction with Todoist.

mgsloan

comment created time in 2 months

issue closedmgsloan/todoist-shortcuts

Shortcut for toggling between task completable and incompletable

A request from flayra on buymeacoffee. A task is marked incompleteable by adding * prefix to its text content. Since there is no button for this, unfortunately it is not straightforward to add. It could conceivably be done by entering the task editor and scripting the interaction with the input

closed time in 2 months

mgsloan

issue commentmgsloan/todoist-shortcuts

Feature request: Shortcut for create new project + for 'add task and create project for it at the same time'

Closing as wontfix, I don't plan to have project management bindings

savolai

comment created time in 2 months