Re: [Haskell-cafe] ANN: th-desugar simplifies Template Haskell processing

2013-09-02 Thread Anders Persson
For expanding/inlining type synonyms, there is also th-expand-syns (
http://hackage.haskell.org/package/th-expand-syns).

/Anders


On Mon, Sep 2, 2013 at 3:25 AM, Richard Eisenberg e...@cis.upenn.edu wrote:

 No, but I agree that this behavior is useful and in the spirit of
 th-desugar. I can add this to the next version, which should come out in a
 few days (tomorrow?), because I've noticed a bug with the scoping of
 as-patterns in let statements.

 Thanks for the suggestion!
 Richard

 On Aug 31, 2013, at 12:06 PM, Sjoerd Visscher wrote:

  Great package!
 
  One question: Do you remove/inline type synonyms? I ask because I just
 ran into this with some TH code. I'm looking for types that end with - a,
 but that fails when type synonyms are involved.
 
  Sjoerd
 
  On Aug 30, 2013, at 2:08 AM, Richard Eisenberg e...@cis.upenn.edu
 wrote:
 
  I've just uploaded my new th-desugar package, which enables easier
 processing of Template Haskell source syntax by desugaring it into a much
 simpler core language. The meaning of the code after desugaring is
 identical to before desugaring, but the syntax is much simpler. To wit,
 th-desugar simplifies out all of the following constructs:
 
  - guarded expressions in both functions and case statements
  - where declarations
  - do syntax
  - list/monad comprehensions
  - record creation / updates
  - as patterns
  - non-trivial patterns in a lambda expression
  - lambda-case
  - multi-way if
  - several more
 
  If you are writing a library that manipulates Template Haskell syntax,
 you may wish to consider if th-desugar will make your job easier by forcing
 you to consider fewer cases. The one source Haskell construct supported by
 Template Haskell but not supported by th-desguar is view patterns, mostly
 because these interact quite non-trivially with pattern binders. It's
 possible this hole will be closed in a future version.
 
  Enjoy!
  Richard
  ___
  Haskell-Cafe mailing list
  Haskell-Cafe@haskell.org
  http://www.haskell.org/mailman/listinfo/haskell-cafe
 
 


 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] A maintenance command of Haskell cabal packages

2011-04-01 Thread Anders Persson
https://github.com/creswick/cabal-dev/issues#issue/15

My workaround was to create a link:
ln -s ~/Library/Haskell/repo-cache ~/.cabal/packages
Cheers,
Anders

On Apr 1, 2011, at 7:38 AM, Kazu Yamamoto (山本和彦) wrote:

 Hello,
 
 cabal-dev is a wrapper around cabal. It creates the directory
 cabal-dev in your current directory when you run commands.
 
 Yes, I know. But when I typed cabal-devel install on a package
 directory, nothing happened.
 
 Can you give a specific example? Surely *something* happened :)
 
 I guess this happens with Haskell Platform for MacOS only. In this
 environment, .cabal/config specifies as follows:
 
   remote-repo-cache: /Users/user/Library/Haskell/repo-cache
 
 But cabal-dev refers to /Users/user/.cabal/packages. After
 cabal-dev update to create it, everything becomes fine to me.
 
 Thank you.
 
 --Kazu
 
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Uninstall Haskell Platform on Mac OS X

2011-03-14 Thread Anders Persson
This is a procedure suggested by Mark Lentczner on the haskell-platform mailing 
list. It clears out _any_ and _all_ versions of haskell platform, so use with 
care.

/Anders

Begin forwarded message:

 These installers don't attempt to uninstall prior versions, and depending on
 how your prior versions were installed, they may, or may not, happily co-exist
 with this installation. I'm interested to hear experience reports of trying
 these installers both systems both with and without prior Haskell setups.
 
 You can probably erase most (all?) traces of a prior Haskell install with this
 procedure:
   sudo rm -rf /Library/Frameworks/GHC.framework
   sudo rm -rf /Library/Frameworks/HaskellPlatform.framework
   sudo rm -rf /Library/Haskell
   rm -rf .cabal
   rm -rf .ghc
   rm -rf ~/Library/Haskell
   find /usr/bin /usr/local/bin -type l | \
 xargs -If sh -c '/bin/echo -n f /; readlink f' | \
 egrep '//Library/(Haskell|Frameworks/(GHC|HaskellPlatform).framework)' | \
 cut -f 1 -d ' '  /tmp/hs-bin-links
   # review /tmp/hs-links
   sudo rm `cat /tmp/hs-bin-links`

On Mar 14, 2011, at 3:48 PM, Jesse Schalken wrote:

 This leaves the symlinks alex, cabal, cabal.real, cabal.wrap and 
 happy in /usr/bin, and also leaves 
 /Library/Frameworks/HaskellPlatform.framework, and while I can remove those 
 myself how can I be certain there isn't something else left behind?
 
 On Tue, Mar 15, 2011 at 1:31 AM, Anders Persson anders.cj.pers...@gmail.com 
 wrote:
 This is what I do.
 
 At a terminal prompt:
  sudo /Library/Frameworks/GHC.framework/Versions/Current/Tools/Uninstaller
  sudo rm -r /Library/Haskell
 
 Cheers,
 Anders
 
 On Mar 14, 2011, at 3:22 PM, Jesse Schalken wrote:
 
 Simple question which an hour of googling and a question on #haskell 
 couldn't satisfy. :(
 
 I have installed the Haskell Platform 2011.2.0.0 on Mac OS X 10.6.6.
 
 Now how do I uninstall it?
 
 Thanks,
 Jesse
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe
 
 

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe