code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE QuasiQuotes #-}
import LiquidHaskell
[lq| ack :: m:Nat -> n:Nat -> Nat / [m, n]|]
ack :: Int -> Int -> Int
ack m n
| m == 0 = n + 1
| m > 0 && n == 0 = ack (m-1) 1
| m > 0 && n > 0 = ack (m-1) (ack m (n-1))
| spinda/liquidhaskell | tests/gsoc15/unknown/pos/Ackermann.hs | bsd-3-clause | 247 | 2 | 10 | 88 | 142 | 69 | 73 | 8 | 1 |
-- |
-- Module : Language.SequentCore.Inspect
-- Description : Sequent Core information dumper
-- Maintainer : maurerl@cs.uoregon.edu
-- Stability : experimental
--
-- An optimizer plugin that reports specified information about the module from
-- a Sequent Core standpoint.
module Language.SequentCore.Inspect ... | osa1/sequent-core | src/Language/SequentCore/Inspect.hs | bsd-3-clause | 2,720 | 0 | 17 | 664 | 604 | 326 | 278 | 53 | 3 |
{-# Language FlexibleContexts #-}
--------------------------------------------------------------------
-- |
-- Module: HTrade.Shared.Utils
--
-- Various utility functions shared between the projects.
module HTrade.Shared.Utils where
import qualified Control.Concurrent.Async as A
import Control.Concu... | davnils/distr-btc | src/HTrade/Shared/Utils.hs | bsd-3-clause | 2,060 | 0 | 12 | 482 | 475 | 256 | 219 | 43 | 3 |
{-# LANGUAGE BangPatterns #-}
module Math.ContinuedFraction (CF
,fromDouble
,toDouble
,fromDoubleP
,takeCF
)
where
import qualified Data.Vector as V
-- |Continued fra... | alpmestan/continued-fractions | Math/ContinuedFraction.hs | bsd-3-clause | 1,365 | 0 | 15 | 408 | 340 | 188 | 152 | 23 | 2 |
module DependencyInjection.Laces
( Inject()
, inject
, unInject
, Dependable()
, use
, Module()
, DependencyError(..)
, componentOrThrow
, componentMay
, componentWhy
)
where
import Control.Exception
import Data.Dynamic
import qualified Data.Map as M
import Data.Maybe
import Data.Monoid
newtype Inject a = Inject a
... | dave4420/dependency-injection-laces | src/DependencyInjection/Laces.hs | bsd-3-clause | 3,646 | 0 | 13 | 767 | 1,246 | 645 | 601 | -1 | -1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
-- |
-- #name_types#
-- GHC uses several kinds of name internally:
--
-- * 'OccName.OccName' represents names as strin... | sdiehl/ghc | compiler/basicTypes/OccName.hs | bsd-3-clause | 33,445 | 0 | 14 | 8,903 | 5,550 | 2,966 | 2,584 | 458 | 5 |
module HttpClient where
import Network.HTTP.Client
import Network.HTTP.Types.Status (statusCode)
import Network.HTTP.Types.Header
import qualified Data.ByteString.Char8 as Byte
import Data.ByteString.Lazy.Char8 as C
import Game
import MExp
import Data.Maybe
getUrl gameId player = "http://tictactoe.homedir.eu/game/" +... | tomas-stuina/fp | src/HttpClient.hs | bsd-3-clause | 2,370 | 8 | 24 | 538 | 757 | 381 | 376 | 62 | 2 |
-- | These are the objects of the TPFS system: namely, files and
-- tags. This module provides the low-level functions for managing
-- file/tag info and their respective tables, as well as somewhat
-- higher-level functions for more sane access.
module System.TPFS.Objects (
-- * File objects
-- ** The file tabl... | devyn/TPFS | System/TPFS/Objects.hs | bsd-3-clause | 10,148 | 0 | 10 | 3,527 | 991 | 582 | 409 | 133 | 1 |
module Control.Distributed.Process.Internal.Containers where
class (Eq k, Functor m) => Map m k | m -> k where
empty :: m a
member :: k -> m a -> Bool
insert :: k -> a -> m a -> m a
delete :: k -> m a -> m a
lookup :: k -> m a -> a
filter :: (a -> Bool) -> m a -> ... | haskell-distributed/distributed-process-platform | src/Control/Distributed/Process/Platform/Internal/Containers.hs | bsd-3-clause | 375 | 0 | 10 | 140 | 179 | 92 | 87 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeFamilies #-}
module ObjectSpec where
import Control.Applicative hiding (empty)... | nushio3/dynamic-object | test/ObjectSpec.hs | bsd-3-clause | 4,081 | 0 | 40 | 1,129 | 1,345 | 715 | 630 | 88 | 3 |
--------------------------------------------------------------------------------
-- |
-- Module : TicTacToe
-- Copyright : (c) 2008-2010 Galois, Inc.
-- License : BSD3
--
-- Maintainer : John Launchbury <john@galois.com>
-- Stability :
-- Portability : concurrency
--
-- A test file for the Orc EDSL
--
{... | GaloisInc/orc | src/Examples/tictactoe.hs | bsd-3-clause | 2,749 | 0 | 16 | 749 | 1,113 | 582 | 531 | 74 | 2 |
-- |
-- Module : Main
-- Copyright : (c) 2018 Harendra Kumar
--
-- License : BSD3
-- Maintainer : streamly@composewell.com
import Control.DeepSeq (NFData)
import Data.Functor.Identity (Identity, runIdentity)
import System.Random (randomRIO)
import qualified NestedOps as Ops
import Streamly
import Gauge
be... | harendra-kumar/asyncly | benchmark/Nested.hs | bsd-3-clause | 4,283 | 0 | 11 | 1,378 | 983 | 482 | 501 | 67 | 1 |
module Network.HTTP.AuthProxy.Claim
( CS.getKey, CS.Key
, headerName, assert, check, Options(..), defaultOptions, checkMiddleware
) where
import Control.Monad
import qualified Data.ByteString as BS
import Data.Maybe
import Network.HTTP.Types
import Network.Wai
import Text.Email.Validate
import qualified Web.Cli... | ktvoelker/auth-proxy | auth-claim/Network/HTTP/AuthProxy/Claim.hs | bsd-3-clause | 2,206 | 0 | 14 | 443 | 764 | 419 | 345 | -1 | -1 |
module Neural (NeuralNetwork, buildNeuralNetwork, buildRandomNeuralNetwork, calculateHighestOutputIndex, calculateOutputValues, mutate) where
import Data.List
import Data.List.Split
import Data.Ord
import System.Random
type Value = Double
data NeuralNetwork = NeuralNetwork Value [Int] [[[Value]]] deriving Show -- we... | KenseiMaedhros/neural-net-visual-test | src/Neural.hs | bsd-3-clause | 3,363 | 0 | 15 | 660 | 908 | 477 | 431 | 50 | 2 |
module Graphics.Gnuplot.Execute where
import System.Exit (ExitCode, )
import System.Cmd (system, )
import Graphics.Gnuplot.Utility
(quote, semiColonConcat, )
simple ::
[String] {-^ The lines of the gnuplot script to be piped into gnuplot -}
-> [String] {-^ Options for gnuplot -}
-> IO ExitCode
simple ... | wavewave/gnuplot | execute/shell/Graphics/Gnuplot/Execute.hs | bsd-3-clause | 642 | 0 | 15 | 166 | 125 | 70 | 55 | 15 | 1 |
{-# LANGUAGE
ScopedTypeVariables, TupleSections, LambdaCase,
RankNTypes, ScopedTypeVariables #-}
module CBSD.Messages.SocketComm where
import CBSD.Messages.Types
import Network
import System.IO
import Control.Exception
import Control.Concurrent
import Data.Function
import Data.Aeson
import Text.Printf
import qu... | AndrasKovacs/elte-cbsd | src/CBSD/Messages/SocketComm.hs | bsd-3-clause | 3,654 | 0 | 17 | 781 | 895 | 452 | 443 | 80 | 3 |
module WriteATypeSignature where
-- chapter 5 "write a type signature" pg. 151
functionH :: [a] -> a
functionH (x:_)= x
functionC :: (Ord a) => a -> a -> Bool
functionC x y =
if (x > y) then True else False
functionS :: (a, b) -> b
functionS (x, y) = y
| brodyberg/Notes | ProjectRosalind.hsproj/LearnHaskell/lib/HaskellBook/WriteATypeSignature.hs | mit | 259 | 0 | 7 | 59 | 108 | 62 | 46 | 8 | 2 |
-- Copyright (c) 2015 Eric McCorkle. All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions
-- are met:
--
-- 1. Redistributions of source code must retain the above copyright
-- notice, this list of conditi... | emc2/saltlang | test/library/UnitTest.hs | bsd-3-clause | 1,919 | 0 | 7 | 343 | 128 | 91 | 37 | 9 | 1 |
-- |
-- TH.Lib contains lots of useful helper functions for
-- generating and manipulating Template Haskell terms
{-# LANGUAGE CPP #-}
module Language.Haskell.TH.Lib where
-- All of the exports from this module should
-- be "public" functions. The main module TH
-- re-exports them all.
import Language.H... | snoyberg/ghc | libraries/template-haskell/Language/Haskell/TH/Lib.hs | bsd-3-clause | 26,397 | 0 | 13 | 6,492 | 8,587 | 4,412 | 4,175 | -1 | -1 |
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# LANGUAGE OverloadedStrings, ForeignFunctionInterface, CPP, MagicHash,
GeneralizedNewtypeDeriving #-}
-- | JSString standard functions, to make them a more viable alternative to
-- the horribly inefficient standard Strings.
--
-- Many functions have linear ... | nyson/haste-compiler | libraries/haste-lib/src/Haste/JSString.hs | bsd-3-clause | 11,643 | 288 | 14 | 2,241 | 2,939 | 1,609 | 1,330 | 133 | 2 |
module QuickCheckTesting where
import Test.QuickCheck
import Data.Ratio
someFun :: [Int] -> Int
someFun [] = 0
someFun xs = head xs
symmetry :: [a] -> [a]
symmetry = reverse
symRel :: Eq a => [a] -> [a] -> Bool
symRel xs ys = xs == reverse ys
-- test: any two symmetric sequences give the same result under someFun... | GRACeFUL-project/GRACe | examples/QuickCheckTesting.hs | bsd-3-clause | 2,903 | 0 | 16 | 713 | 1,188 | 624 | 564 | 59 | 2 |
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances,
UndecidableInstances, FlexibleContexts, EmptyDataDecls, ScopedTypeVariables,
TypeOperators, TypeSynonymInstances, TypeFamilies #-}
module Methods where
import Records
import References
{-
un metodo prende un a e ritorna una re... | vs-team/Papers | Before Giuseppe's PhD/Monads/ObjectiveMonad/MonadicObjects/trunk/Src/Methods.hs | mit | 2,540 | 0 | 18 | 986 | 634 | 348 | 286 | 35 | 1 |
import Test.HUnit (Assertion, (@=?), runTestTT, Test(..), Counts(..))
import System.Exit (ExitCode(..), exitWith)
import Roman (numerals)
exitProperly :: IO Counts -> IO ()
exitProperly m = do
counts <- m
exitWith $ if failures counts /= 0 || errors counts /= 0 then ExitFailure 1 else ExitSuccess
testCase :: Stri... | pminten/xhaskell | roman-numerals/roman-numerals_test.hs | mit | 1,039 | 0 | 12 | 227 | 392 | 204 | 188 | 32 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-iam/gen/Network/AWS/IAM/GetPolicy.hs | mpl-2.0 | 3,899 | 0 | 9 | 834 | 432 | 268 | 164 | 53 | 1 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, PatternGuards #-}
{- A high level language of tactic composition, for building
elaborators from a high level language into the core theory.
This is our interface to proof construction, rather than
ProofState, because this gives us a language to build der... | uwap/Idris-dev | src/Idris/Core/Elaborate.hs | bsd-3-clause | 34,161 | 12 | 23 | 12,688 | 12,407 | 6,140 | 6,267 | 703 | 12 |
{-# LANGUAGE OverloadedStrings #-}
module Tests.Readers.Markdown (tests) where
import Text.Pandoc.Definition
import Test.Framework
import Tests.Helpers
import Tests.Arbitrary()
import Text.Pandoc.Builder
import qualified Data.Set as Set
-- import Text.Pandoc.Shared ( normalize )
import Text.Pandoc
import Text.Pandoc.E... | janschulz/pandoc | tests/Tests/Readers/Markdown.hs | gpl-2.0 | 20,928 | 0 | 22 | 6,825 | 3,872 | 2,042 | 1,830 | 383 | 1 |
module MediaWiki.API.Query.Users.Import where
import MediaWiki.API.Utils
import MediaWiki.API.Query.Users
import Text.XML.Light.Types
import Text.XML.Light.Proc ( strContent )
import Control.Monad
import Data.Maybe
stringXml :: String -> Either (String,[{-Error msg-}String]) UsersResponse
stringXml s = parseDoc x... | neobrain/neobot | mediawiki/MediaWiki/API/Query/Users/Import.hs | bsd-3-clause | 1,281 | 2 | 16 | 319 | 509 | 255 | 254 | 36 | 2 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}
module Stack.Options.Completion
( ghcOptsCompleter
, targetCompleter
, flagCompleter
, projectExeCompleter
) where
import Data.Char (isSpace)
import Data.List (isPrefixOf)
impor... | juhp/stack | src/Stack/Options/Completion.hs | bsd-3-clause | 4,065 | 0 | 21 | 1,126 | 1,062 | 564 | 498 | 98 | 6 |
{-# LANGUAGE RankNTypes #-}
module T17213a where
foo :: (forall a. a->a)-> Int
foo x = error "ukr"
| sdiehl/ghc | testsuite/tests/typecheck/should_fail/T17213a.hs | bsd-3-clause | 100 | 0 | 8 | 19 | 37 | 21 | 16 | 4 | 1 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="sl-SI">
<title>Selenium add-on</title>
<maps>
<homeID>top</homeID>
<mapref location="ma... | thc202/zap-extensions | addOns/selenium/src/main/javahelp/org/zaproxy/zap/extension/selenium/resources/help_sl_SI/helpset_sl_SI.hs | apache-2.0 | 960 | 82 | 53 | 156 | 394 | 208 | 186 | -1 | -1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Text.Strict.Lens
-- Copyright : (C) 2012-2015 Edward Kmett
-- License : BSD-style (see the file LICENSE)
-- Maintainer : Edward Kmett <ekmett@gmail.c... | danidiaz/lens | src/Data/Text/Strict/Lens.hs | bsd-3-clause | 3,646 | 0 | 13 | 658 | 502 | 317 | 185 | 50 | 1 |
import qualified Data.Vector as U
main = print (U.and (U.replicate 100 True))
| dolio/vector | old-testsuite/microsuite/and.hs | bsd-3-clause | 79 | 0 | 10 | 13 | 35 | 19 | 16 | 2 | 1 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
{-# LANGUAGE ExistentialQuantification #-}
{- | This module gives you a way to mount applications under sub-URIs.
For example:
> bugsApp, helpdeskApp, apiV1, apiV2, mainApp :: Application
>
> myApp :: Application
> myApp = mapUrls $
> mount "bugs" bugs... | AndrewRademacher/wai | wai-extra/Network/Wai/UrlMap.hs | mit | 3,240 | 0 | 13 | 946 | 767 | 425 | 342 | 63 | 2 |
-- A test to show that -XStaticPointers keeps generated CAFs alive.
{-# LANGUAGE StaticPointers #-}
module Main where
import GHC.StaticPtr
import Control.Concurrent
import Data.Maybe (fromJust)
import GHC.Fingerprint
import System.Mem
import System.Mem.Weak
import Unsafe.Coerce (unsafeCoerce)
nats :: [Integer]
nats ... | wxwxwwxxx/ghc | testsuite/tests/rts/GcStaticPointers.hs | bsd-3-clause | 840 | 0 | 12 | 150 | 195 | 103 | 92 | 23 | 1 |
{-
From: Paul Sanders <psanders@srd.bt.co.uk>
To: partain
Subject: A puzzle for you
Date: Mon, 28 Oct 91 17:02:19 GMT
I'm struggling with the following code fragment at the moment:
-}
import Data.Array -- 1.3
import Data.Ix -- 1.3
conv_list :: (Ix a, Ix b) => [a] -> [b] -> [[c]] -> Array (a,b) c -> Array (a,b) c
... | urbanslug/ghc | testsuite/tests/programs/sanders_array/Main.hs | bsd-3-clause | 1,508 | 1 | 11 | 345 | 519 | 293 | 226 | 22 | 1 |
-- | Non-Futhark-specific utilities. If you find yourself writing
-- general functions on generic data structures, consider putting them
-- here.
--
-- Sometimes it is also preferable to copy a small function rather
-- than introducing a large dependency. In this case, make sure to
-- note where you got it from (and ... | ihc/futhark | src/Futhark/Util.hs | isc | 6,102 | 0 | 11 | 1,498 | 1,633 | 872 | 761 | 128 | 3 |
main = getContents >>= putStr . main'
main' :: String -> String
main' cs = unlines $ map ( takeWhile (/= ':') ) ( lines cs )
| ryuichiueda/UspMagazineHaskell | Study1_Q1/q1_1.hs | mit | 126 | 0 | 9 | 28 | 56 | 29 | 27 | 3 | 1 |
{-# LANGUAGE FlexibleContexts, OverloadedStrings #-}
module Player.Cheats where
import Player.Types
import Universe
import Resources
import Player
import Data.Map.Strict
import Data.AdditiveGroup
import Reflex.Dom
import GHCJS.DOM.EventM (on)
import GHCJS.DOM.GlobalEventHandlers (keyPress)
cheatsHandler :: PlayerWid... | martin-kolinek/some-board-game | src/Player/Cheats.hs | mit | 896 | 0 | 14 | 147 | 256 | 138 | 118 | 21 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Day8 (day8, day8', run, Instruction(..), Screen, applyInstruction, parseInput) where
import Data.Array.Unboxed ((//), (!), UArray, bounds, elems, listArray, range)
import Text.Parsec ((<|>) , Parsec , ParseError)
import qualified Text.Parsec as P
data Instruction = Rect Int I... | brianshourd/adventOfCode2016 | src/Day8.hs | mit | 2,228 | 0 | 13 | 454 | 1,012 | 563 | 449 | -1 | -1 |
{-# LANGUAGE RankNTypes, FlexibleContexts #-}
module FTag.Sort (sortByTags) where
import qualified Data.Text as T
import Data.List (sortBy)
import Data.Ord (comparing)
import Env
import FTag.Data
import FTag.DB
sortByTags :: [TagN] -> [StorFileN] -> FTag [StorFileN]
sortByTags ts fs = sortByValues <$> (runInDB (map... | chrys-h/ftag | src/FTag/Sort.hs | mit | 887 | 0 | 13 | 200 | 378 | 205 | 173 | 20 | 2 |
{- |
Module : IntermediateCode.hs
Description : Intermediate code generation
Maintainer : Philipp Borgers, Tilman Blumenbach, Lyudmila Vaseva, Sascha Zinke,
Maximilian Claus, Michal Ajchman, Nicolas Lehmann, Tudor Soroceanu
License : MIT
Stability : unstable
IntemediateCode.hs takes the... | SWP-Ubau-SoSe2014-Haskell/SWPSoSe14 | src/RailCompiler/IntermediateCode.hs | mit | 28,804 | 0 | 26 | 6,419 | 7,402 | 4,245 | 3,157 | 615 | 3 |
import Control.Applicative
import Data.Monoid hiding (Sum, First)
import Test.QuickCheck hiding (Success)
import Test.QuickCheck.Checkers
import Test.QuickCheck.Classes
-- List Applicative Exercise
-- Implement the List Applicative. Writing a minimally complete Applicative
-- instance calls for writing the definition... | diminishedprime/.org | reading-list/haskell_programming_from_first_principles/17_08.hs | mit | 5,818 | 75 | 13 | 1,485 | 2,152 | 1,087 | 1,065 | 127 | 1 |
{-# LANGUAGE FlexibleInstances,
UndecidableInstances,
TypeFamilies,
RankNTypes,
GADTs,
OverloadedStrings,
ScopedTypeVariables
#-}
-----------------------------------------------------------------------------
{- |
Module : Language.Ja... | ghcjs/ghcjs | src/Compiler/JMacro/QQ.hs | mit | 23,943 | 0 | 26 | 8,072 | 7,623 | 3,852 | 3,771 | 481 | 14 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE RankNTypes #-}
module Virtual (
vnode,
vnodeFull,
svg,
rect,
vtext,
vbutton,
renderSetup,
rerender,
documentBody,
diff,
patch,
TreeState(..),
makeTreeState,
Size(..),
Position(..),
HTML()
) where
import GHCJS.Foreign
import GHCJS.Types
import System.... | krisajenkins/BellRinger | src/Virtual.hs | epl-1.0 | 4,427 | 36 | 11 | 969 | 1,433 | 738 | 695 | -1 | -1 |
module PSequent where
import PrelSequent
import Sequent
-- parsers for formulae and sequents. AR 4/4/1999 -- 13/4
pSequent :: Parser Char Sequent
pSequent = pContext ... jL "=>" +.. (pContext *** reverse)
pContext = pTList "," (pFormula 1) ||| succeed []
pFormula :: Int -> Parser Char Formula -- Int is precedence... | Tomoaki-Hashizaki/pesca | src/PSequent.hs | gpl-2.0 | 2,545 | 0 | 32 | 758 | 963 | 500 | 463 | -1 | -1 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE RankNTypes #-}
module Png.PngContainer (PngImage(..), PngImageType(..)) where
import Codec.Picture.Metadata (Metadatas)
impor... | Ofenhed/Steganography | src/Png/PngContainer.hs | gpl-2.0 | 3,300 | 0 | 17 | 571 | 912 | 499 | 413 | 55 | 0 |
module Main where
import Expressions (Context,LispError)
import Parser (parse)
import Eval (eval)
import Std (initialCtx)
import System.IO
import System.IO.Error
import Control.Exception
import Control.Monad.State
import Control.Monad.Error
main = runErrorT (evalStateT repl initialCtx)
repl :: StateT C... | aksiazek/yali | src/Main.hs | gpl-2.0 | 878 | 1 | 16 | 307 | 257 | 134 | 123 | 26 | 2 |
module Test.AllTests
where
import Test.HUnit
import Data.List (isPrefixOf)
import qualified Cluedo.Model as Model
import qualified Cluedo.Utils as Utils
testCardCount :: Assertion
testCardCount = 21 @=? Model.cardCount
testIsPieceCard_isPiece :: Assertion
testIsPieceCard_isPiece = (Model.isPieceCard Model.White) @?... | VictorDenisov/cluedo | src/Test/AllTests.hs | gpl-2.0 | 13,208 | 0 | 14 | 3,851 | 2,507 | 1,365 | 1,142 | 319 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# CFILES cbits/hfrequencyqueue_backend.cpp #-}
{-|
Module : FrequencyQueue.IO
Description : Provide the IO interface for FrequencyQueue
Copyright : (c) Andrea Bellandi 2014
License : GPL-3
Maintainer : bellaz89@gmai.com
Stability : experimental
Portability : POSIX
This mo... | Bellaz/HfrequencyList | src/FrequencyQueue/IO.hs | gpl-3.0 | 11,796 | 0 | 14 | 3,138 | 2,516 | 1,276 | 1,240 | 145 | 2 |
-- Challenge 1:
-- Can we turn the Maybe type constructor into a functor by defining:
--
-- fmap _ _ = Nothing
--
-- which ignores both of its arguments? (Hint: Check the functor laws.)
--
--
-- 1. preserves identity is not met because,
-- fmap _ (Just x) will not be = Just x
--
-- similarly composition will not be ... | sujeet4github/MyLangUtils | CategoryTheory_BartoszMilewsky/PI_07_Functors/ex1_Maybe.hs | gpl-3.0 | 362 | 0 | 2 | 76 | 15 | 14 | 1 | 1 | 0 |
import Text.ParserCombinators.Parsec hiding (spaces)
import Control.Monad
data LispVal = Atom String
| List [LispVal]
| DottedList [LispVal] LispVal
| Number Integer
| String String
| Bool Bool
parseNumber :: Parser LispVal
parseNumber = do
s <- many1... | lifengsun/haskell-exercise | scheme/02/ex-1-1.a.hs | gpl-3.0 | 356 | 0 | 9 | 116 | 98 | 54 | 44 | 12 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANG... | ttylec/QLogic | src/QLogic/BoxWorld.hs | gpl-3.0 | 9,731 | 0 | 14 | 2,492 | 3,005 | 1,563 | 1,442 | 145 | 3 |
module Main where
import VSim.Runtime
stuff x = return ()
elab :: Elab IO ()
elab = do
t_int <- alloc_unranged_type
t_0_5 <- alloc_ranged_type (alloc_range (int 0) (int 5))
s1 <- alloc_signal "s1" t_int defval
s2 <- alloc_signal "s2" t_int defval
clk <- alloc_signal "clk" t_int (a... | grwlf/vsim | src_r/Test/User1.hs | gpl-3.0 | 795 | 0 | 17 | 242 | 317 | 151 | 166 | 20 | 1 |
import Test.QuickCheck
import Test.QuickCheck.Gen (oneof)
import Lib
-- 1. Equal probabilities for each.
foolGen :: Gen Fool
foolGen = do
oneof [return Frue, return Fulse]
-- 2. 2/3s chance of Fulse, 1/3 chance of Frue.
foolGen' :: Gen Fool
foolGen' = do
frequency [(1, return Frue),
(2, return ... | nirvinm/Solving-Exercises-in-Haskell-Programming-From-First-Principles | Testing/generator/test/Spec.hs | gpl-3.0 | 392 | 2 | 10 | 87 | 125 | 62 | 63 | 12 | 1 |
{-# LANGUAGE ExtendedDefaultRules #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
-- Module : Network.PagerDuty.REST.Services.EmailFilters
-- Copyright : (c) 2013-2015 Brendan Hay <brendan.g.hay@gmail.com>
-- License : This Source ... | brendanhay/pagerduty | src/Network/PagerDuty/REST/Services/EmailFilters.hs | mpl-2.0 | 6,417 | 0 | 13 | 1,482 | 929 | 524 | 405 | 87 | 1 |
{-# LANGUAGE DatatypeContexts #-}
data
( LooooooooooooooooooooongConstraint a
, LooooooooooooooooooooongConstraint b
) =>
MyRecord a b
= MyConstructor
{ foo1, foo2
:: loooooooooooooooooooooooooooooooong
-> loooooooooooooooooooooooooooooooong
, bar :: a
, bazz :: b
}
| lspitzner/brittany | data/Test51.hs | agpl-3.0 | 310 | 3 | 6 | 77 | 54 | 31 | 23 | 11 | 0 |
{-
Copyright (C) 2009 Andrejs Sisojevs <andrejs.sisojevs@nextmail.ru>
All rights reserved.
For license and copyright information, see the file COPYRIGHT
-}
--------------------------------------------------------------------------
--------------------------------------------------------------------------
-- | Here ... | Andrey-Sisoyev/haskell-PCLT | Text/PCLT/Template.hs | lgpl-2.1 | 15,195 | 0 | 23 | 4,035 | 1,931 | 1,106 | 825 | 137 | 6 |
reverse' :: [a] -> [a]
reverse' [] = []
reverse' (x:xs)= reverse' xs ++ [x]
| EricYT/Haskell | src/reverse.hs | apache-2.0 | 80 | 0 | 6 | 19 | 58 | 29 | 29 | 3 | 1 |
module Main where
import Options
import Harlson
main :: IO ()
main = progOpts >>= runHarlson
| EchoTeam/harlson | Main.hs | bsd-2-clause | 96 | 0 | 6 | 19 | 29 | 17 | 12 | 5 | 1 |
{-# LANGUAGE TypeFamilies, QuasiQuotes, MultiParamTypeClasses,
TemplateHaskell, OverloadedStrings #-}
import Yesod
data MyWebSite = MyWebSite
instance Yesod MyWebSite
mkYesod "MyWebSite" [parseRoutes|
/ HomeR GET
|]
getHomeR = defaultLayout $ do
[whamlet|
<h2> Things To Do
<ul>
<li> Le... | capello/Haskell_Premier | web.hs | bsd-2-clause | 503 | 2 | 9 | 127 | 70 | 37 | 33 | -1 | -1 |
{-# OPTIONS_GHC -W #-}
module Main where
import Control.Monad (foldM)
import qualified Data.Maybe as Maybe
import Text.Blaze.Html.Renderer.String (renderHtml)
import qualified Data.ByteString.Lazy.Char8 as BS
import qualified System.Console.CmdArgs as CmdArgs
import System.Directory
import System.FilePath
import GHC.C... | deadfoxygrandpa/Elm | compiler/Compiler.hs | bsd-3-clause | 2,326 | 0 | 13 | 551 | 651 | 338 | 313 | 52 | 3 |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
-------------------------------------------------------------------------------
-- |
-- Module : Yesod.Comments
-- Copyright : (c) Patrick Brisbin 2010
-- License : as-is
-- Maintainer : pbrisbin@gma... | pbrisbin/yesod-comments | Yesod/Comments.hs | bsd-3-clause | 1,107 | 0 | 11 | 205 | 143 | 87 | 56 | 16 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
module Search.Site where
import Servant
import Text.Blaze.Html5 hiding (map)
import Database.Persist.Postgresql
import Control.Monad (liftM)
import AppM
import Area.Types
import Blc.Types
import Search.Types
import Search.API... | hectorhon/autotrace2 | app/Search/Site.hs | bsd-3-clause | 755 | 0 | 18 | 138 | 245 | 128 | 117 | 25 | 2 |
module HSNTP.Util.Misc (udpQuery, runWithTO', runWithTO, Time, seconds, MayIO) where
import Control.Concurrent
import Control.Exception
import Control.Monad.Error
import Foreign
import Foreign.Ptr
import Network.Socket
import Prelude hiding (catch)
import HSNTP.Util.UDP
withUDPBuf :: Int -> ((Socket, BPtr) -> IO a) ... | creswick/hsntp | HSNTP/Util/Misc.hs | bsd-3-clause | 2,190 | 0 | 14 | 780 | 821 | 412 | 409 | 47 | 2 |
import System.Environment (getEnv, getArgs, getProgName, getExecutablePath,
getEnvironment)
| hecrj/haskell-format | test/specs/import-multiline/input.hs | bsd-3-clause | 94 | 0 | 5 | 9 | 23 | 14 | 9 | 2 | 0 |
{-| The context that several of the Translatable typeclasses use
for compiling. It is used to generate new symbols for temporary
variables, store the mappings from encore variables to c variables
and to keep track of which class we're translating at the
moment. -}
module CodeGen.Context (
Context,
ExecContext(..),... | parapluu/encore | src/back/CodeGen/Context.hs | bsd-3-clause | 3,929 | 0 | 15 | 709 | 1,155 | 638 | 517 | -1 | -1 |
{-# LANGUAGE ExistentialQuantification, ScopedTypeVariables, PatternGuards, FlexibleContexts, CPP #-}
module Simple
( Task (..), TaskChan
, startGHCiServer
, restartGHCiServer
, sendToServer
, catchError_fixed
, Interpreter, typeOf, kindOf
, InterpreterError (..), errMsg, interpret
, a... | divipp/ActiveHs | Simple.hs | bsd-3-clause | 3,276 | 1 | 19 | 897 | 1,091 | 559 | 532 | 80 | 4 |
------------------------------------------------------------------------------
-- |
-- Maintainer : Joost Visser
-- Stability : experimental
-- Portability : portable
--
-- This module is part of 'Sdf2Haskell', a tool for generating Haskell
-- code from an SDF grammar. This module contains helper functions
-- for th... | jkoppel/Strafunski-Sdf2Haskell | generator/Sdf2HaskellUtils.hs | bsd-3-clause | 2,206 | 0 | 12 | 413 | 445 | 246 | 199 | 31 | 2 |
module TwentyFive where
import System.Random
import Data.List
--Generate a random permutation of the elements of a list.
rndPermu :: [a] -> [a]
rndPermu lst = let permu = permutations lst
in permu !! (fst (randomR (0,(length permu) -1) (mkStdGen 9127401298374)))
| michael-j-clark/hjs99 | src/21to30/TwentyFive.hs | bsd-3-clause | 272 | 0 | 15 | 49 | 92 | 50 | 42 | 6 | 1 |
-- #hide
-----------------------------------------------------------------------------
-- |
-- Module : Language.Haskell.ParseUtils
-- Copyright : (c) The GHC Team, 1997-2000
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libraries@haskell.org
-- Stability : experime... | FranklinChen/hugs98-plus-Sep2006 | packages/haskell-src/Language/Haskell/ParseUtils.hs | bsd-3-clause | 10,751 | 73 | 16 | 2,274 | 3,708 | 1,823 | 1,885 | 226 | 25 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
module Shapes where
import Graphics.GL.Pal
import Types
galleryShapes :: IO (Shapes Uniforms)
galleryShapes = do
{-
Setting up resources that will be used across multiple ... | vrtree/pedestal | app/Shapes.hs | bsd-3-clause | 1,594 | 0 | 13 | 374 | 309 | 153 | 156 | 26 | 1 |
-- | Get items from the DB.
module HN.Model.Items where
import HN.Types
import HN.Monads
import Snap.App
-- | Get items filtered by content source.
getItemsBySource :: Source -> Int -> Model c s [DItem]
getItemsBySource source limit =
query ["SELECT id,source,title,added,published,description,link"
,"FROM... | erantapaa/haskellnews | src/HN/Model/Items.hs | bsd-3-clause | 1,782 | 0 | 13 | 578 | 354 | 195 | 159 | 50 | 2 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[RnExpr]{Renaming of expressions}
Basically dependency analysis.
Handles @Match@, @GRHSs@, @HsExpr@, and @Qualifier@ datatypes. In
general, all of these functions return a renamed thing, and a set of
free variables.
-}
{-# LANGUAGE CPP #-}
{-# LA... | GaloisInc/halvm-ghc | compiler/rename/RnExpr.hs | bsd-3-clause | 80,871 | 107 | 22 | 23,340 | 20,164 | 10,706 | 9,458 | 1,183 | 15 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
--
-- Copyright (c) 2009-2011, ERICSSON AB
-- All rights reserved.
-... | rCEx/feldspar-lang-small | src/Feldspar/Matrix.hs | bsd-3-clause | 6,432 | 0 | 11 | 1,446 | 1,745 | 936 | 809 | 91 | 1 |
{-# LANGUAGE
FlexibleInstances
, GeneralizedNewtypeDeriving
, MultiParamTypeClasses
, StandaloneDeriving
, TypeOperators
#-}
module Control.Arrow.List where
import Control.Arrow
import Control.Arrow.Kleisli.Class
import Control.Arrow.List.Class
import Control.Arrow.ListLike.Class
import Control.Category
... | silkapp/arrow-list | src/Control/Arrow/List.hs | bsd-3-clause | 1,540 | 1 | 13 | 317 | 507 | 273 | 234 | 39 | 1 |
{-# LANGUAGE FlexibleInstances, FlexibleContexts, UndecidableInstances #-}
module QCUtils where
import Test.QuickCheck
import Test.QuickCheck.Arbitrary
import Test.QuickCheck.Gen
import Data.Iteratee
import Data.Iteratee.Iteratee
import qualified Data.Iteratee as I
import qualified Data.ListLike as LL
import Data.Fu... | iteloo/tsuru-sample | iteratee-0.8.9.6/tests/QCUtils.hs | bsd-3-clause | 1,477 | 0 | 12 | 373 | 464 | 245 | 219 | 40 | 1 |
{-# LANGUAGE TupleSections #-}
module One (one) where
import System.IO
import Control.Monad
import Control.Applicative
import Data.List
import Data.List.Split
import Data.Maybe
import Debug.Trace
data Bearing = N | E | S | W deriving (Eq, Show, Enum)
right W = N
right a = succ a
left N = W
left a = pred a
one = do
... | alicemaz/advent2016 | One.hs | bsd-3-clause | 1,766 | 0 | 16 | 540 | 836 | 459 | 377 | 44 | 4 |
module Main (main) where
import Test.Framework (Test, defaultMain,
testGroup)
import Test.Framework.Providers.QuickCheck2 (testProperty)
import BinaryTree as BinTree
import BinomialHeap ... | peterson/lets-tree | tests/Main.hs | bsd-3-clause | 1,283 | 0 | 9 | 431 | 185 | 103 | 82 | 21 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple
-- Copyright : Isaac Jones 2003-2005
-- License : BSD3
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
-- This is the command line front end to the Simple build sys... | typelead/epm | Cabal/Distribution/Simple.hs | bsd-3-clause | 30,035 | 0 | 17 | 8,190 | 5,832 | 2,980 | 2,852 | 487 | 8 |
{-# LANGUAGE OverloadedStrings #-}
module Text.Digestive.Heist.Extras.Debug
( dfShowView
, dfPathList
) where
import Data.Map.Syntax ((##))
import Data.Text (Text)
import qualified Data.Text as T
import Heist.Interpreted
import Text.Digestive.Types (fromPath)
import Text.Digestive.View (View, debugViewPaths)
impor... | cimmanon/digestive-functors-heist-extras | src/Text/Digestive/Heist/Extras/Debug.hs | bsd-3-clause | 883 | 4 | 11 | 117 | 223 | 126 | 97 | 15 | 1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE Over... | manyoo/reflex-dom | src/Reflex/Dom/Builder/Static.hs | bsd-3-clause | 9,971 | 7 | 24 | 1,800 | 2,683 | 1,414 | 1,269 | -1 | -1 |
{-# LANGUAGE MultiWayIf #-}
-- |
-- Module : Language.SequentCore.Lint
-- Description : Type checker for Sequent Core
-- Maintainer : maurerl@cs.uoregon.edu
-- Stability : experimental
--
-- Provides a sanity check for Sequent Core transformations in the tradition of
-- CoreLint.
module Language.SequentCore.... | lukemaurer/sequent-core | src/Language/SequentCore/Lint.hs | bsd-3-clause | 15,850 | 9 | 18 | 3,757 | 4,623 | 2,262 | 2,361 | 315 | 9 |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE OverloadedStrings #-}
module Stanag.VsmAuthorisationResponse where
import Ivory.Language
import Stanag.Packing
import Util.Logger
vsmAuthorisationResponseInstance :: MemArea (Stored U... | GaloisInc/loi | Stanag/VsmAuthorisationResponse.hs | bsd-3-clause | 470 | 0 | 9 | 46 | 69 | 41 | 28 | 12 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-war... | erikd/yesod | yesod-static/Yesod/EmbeddedStatic.hs | mit | 7,695 | 0 | 14 | 1,609 | 911 | 553 | 358 | 79 | 3 |
{-# LANGUAGE CPP #-}
{- |
Module : $Id$
Copyright : (c) Uni Bremen 2003-2005
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : non-portable (imports Logic.Logic)
The Main module of the Heterogeneous Tool Set.
It provides the m... | mariefarrell/Hets | hets.hs | gpl-2.0 | 3,602 | 0 | 21 | 860 | 869 | 449 | 420 | 66 | 10 |
module Specify.Constraint where
import Specify.Expression
import Autolib.TES.Identifier
import Autolib.ToDoc
import Autolib.Reader
import Text.ParserCombinators.Parsec
import Text.ParserCombinators.Parsec.Expr hiding ( Operator )
import Data.Typeable
data System = System [ Constraint ]
deriving Typeable
inst... | florianpilz/autotool | src/Specify/Constraint.hs | gpl-2.0 | 1,117 | 5 | 16 | 277 | 344 | 175 | 169 | 35 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-storagegateway/gen/Network/AWS/StorageGateway/DeleteBandwidthRateLimit.hs | mpl-2.0 | 4,526 | 0 | 9 | 898 | 522 | 316 | 206 | 64 | 1 |
-- | Generic stream manipulations
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE RankNTypes #-}
module System.IO.Streams.Combinators
( -- * Folds
inputFoldM
, outputFoldM
, fold
, foldM
, any
, all
, maximum
, minimum
-- * Unfolds
, unfoldM
-- * Maps
... | TomMD/io-streams | src/System/IO/Streams/Combinators.hs | bsd-3-clause | 26,753 | 0 | 18 | 6,528 | 5,143 | 2,716 | 2,427 | 334 | 3 |
{-# LANGUAGE DeriveDataTypeable, DeriveGeneric #-}
{-
Copyright (C) 2006-2016 John MacFarlane <jgm@berkeley.edu>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(a... | janschulz/pandoc | src/Text/Pandoc/Error.hs | gpl-2.0 | 2,295 | 0 | 16 | 534 | 308 | 169 | 139 | 29 | 2 |
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
module Tests.Readers.RST (tests) where
import Text.Pandoc.Definition
import Test.Framework
import Tests.Helpers
import Tests.Arbitrary()
import Text.Pandoc.Builder
import Text.Pandoc
import Text.Pandoc.Error
rst :: String -> Pandoc
rst = handleError . readRST de... | janschulz/pandoc | tests/Tests/Readers/RST.hs | gpl-2.0 | 7,925 | 0 | 19 | 3,062 | 1,428 | 790 | 638 | 152 | 1 |
{-# LANGUAGE
TemplateHaskell,
MultiParamTypeClasses,
FlexibleInstances,
FlexibleContexts,
UndecidableInstances,
TypeOperators,
ScopedTypeVariables,
TypeSynonymInstances #-}
module DataTypes.Transform where
import Data.Comp
import Data.Comp.Derive
import DataTypes.Standard as S
import DataTypes.Comp
c... | spacekitteh/compdata | benchmark/DataTypes/Transform.hs | bsd-3-clause | 2,702 | 0 | 9 | 652 | 1,069 | 524 | 545 | 78 | 1 |
{-# LANGUAGE MultiParamTypeClasses #-}
-- |This module provides an abstraction for a /migration store/, a
-- facility in which 'Migration's can be stored and from which they
-- can be loaded. This module also provides functions for taking
-- 'Migration's from a store and converting them into the appropriate
-- interme... | nathankot/dbmigrations | src/Database/Schema/Migrations/Store.hs | bsd-3-clause | 6,225 | 0 | 18 | 1,641 | 946 | 527 | 419 | 76 | 5 |
module Lexer where
import Text.Parsec
import Text.Parsec.String
import qualified Text.Parsec.Token as Tok
import Text.Parsec.Language (haskellStyle)
lexer :: Tok.TokenParser ()
lexer = Tok.makeTokenParser style
where ops = ["->","\\","+","*","-","="]
names = ["True", "False"]
style = haskellStyle {T... | yupferris/write-you-a-haskell | chapter5/stlc/Lexer.hs | mit | 863 | 0 | 8 | 203 | 280 | 151 | 129 | 28 | 1 |
{-
{- 3 lines of comments total! -}
-}
| korsakov/ohcount | test/src_dir/haskell3.hs | gpl-2.0 | 55 | 0 | 2 | 21 | 3 | 2 | 1 | 1 | 0 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="ar-SA">
<title>Online Menu | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<mapref ... | thc202/zap-extensions | addOns/onlineMenu/src/main/javahelp/org/zaproxy/zap/extension/onlineMenu/resources/help_ar_SA/helpset_ar_SA.hs | apache-2.0 | 972 | 80 | 65 | 159 | 411 | 208 | 203 | -1 | -1 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="fr-FR">
<title>Passive Scan Rules - Beta | ZAP Extension</title>
<maps>
<homeID>top</homeID>... | kingthorin/zap-extensions | addOns/pscanrulesBeta/src/main/javahelp/org/zaproxy/zap/extension/pscanrulesBeta/resources/help_fr_FR/helpset_fr_FR.hs | apache-2.0 | 991 | 78 | 67 | 162 | 420 | 212 | 208 | -1 | -1 |
-- Simple and efficient printing combinators
module PPrint where
infixr 2 &,!
infixr 1 !/
data Output = Sep | Str String | Nl | Indent Int
newtype Document = P ([Output] -> [Output])
class Printable a where
pr :: a -> Document
prList :: [a] -> Document
prList = wpr
instance Printable Document where
pr = i... | forste/haReFork | tools/base/parse2/LexerGen/PPrint.hs | bsd-3-clause | 2,166 | 2 | 15 | 628 | 1,018 | 523 | 495 | 59 | 13 |
{-# LANGUAGE BangPatterns, CPP, RecordWildCards #-}
-- |
-- Module : Data.Text.Internal.IO
-- Copyright : (c) 2009, 2010 Bryan O'Sullivan,
-- (c) 2009 Simon Marlow
-- License : BSD-style
-- Maintainer : bos@serpentine.com
-- Stability : experimental
-- Portability : GHC
--
-- /Warning/: this... | beni55/text | Data/Text/Internal/IO.hs | bsd-2-clause | 6,351 | 0 | 27 | 1,899 | 1,740 | 908 | 832 | 115 | 6 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Program.Find
-- Copyright : Duncan Coutts 2013
--
-- Maintainer : cabal-devel@h... | themoritz/cabal | Cabal/Distribution/Simple/Program/Find.hs | bsd-3-clause | 7,018 | 0 | 22 | 1,566 | 1,187 | 646 | 541 | 95 | 9 |
{-# LANGUAGE MagicHash, BangPatterns #-}
-- Produces a Lint error in GHC 8.0
module T11444 where
import GHC.Exts (reallyUnsafePtrEquality#, Int (..))
ptrEq :: a -> a -> Bool
ptrEq !x !y = I# (reallyUnsafePtrEquality# x y) == 1
| ezyang/ghc | testsuite/tests/simplCore/should_compile/T11444.hs | bsd-3-clause | 230 | 0 | 8 | 41 | 63 | 35 | 28 | 5 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.